﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Vibration_Report.aspx.cs"
    Inherits="client_Vibration_Report" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Vibration Report</title>
    <link href="../styles/client.css" rel="stylesheet" type="text/css" />
    <link href="../styles/lytebox.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="../styles/jquery_themes/redmond/jquery-ui-1.8.5.custom.css" rel="stylesheet"
        type="text/css" />

    <script src="../javascripts/lytebox.js" type="text/javascript"></script>

    <script src="../javascripts/jquery-1.4.3.min.js" type="text/javascript"></script>

    <script src="../javascripts/jquery-ui-1.8.5.custom.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function() {
            $(".datepicker").datepicker({ dateFormat: 'dd/mm/yy' });
        });  
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="content_area">
        <h2>
            Plant:
            <asp:Label ID="sitename" runat="server" Text="Label"></asp:Label>
        </h2>
        <h3>
            Machine:
            <asp:Label ID="machinename" runat="server" Text="Label"></asp:Label>
            <asp:Label ID="machineid" runat="server" Text="Label" Visible="false"></asp:Label>
        </h3>
        <div id="status_wrapper">
            <div class="segment">
                <h4>
                    Status of
                    <asp:Label ID="DateLabel" runat="server" CssClass="datelabel"></asp:Label>
                </h4>
                <%--<table style="vertical-align: top">
                    <tr>
                        <td class="segmentL">
                            <asp:DropDownList ID="DropDownListDate" runat="server" DataSourceID="SqlDataSourceDateEntered"
                                DataTextField="dateEntered" DataTextFormatString=" {0:d}" DataValueField="dateEntered"
                                Visible="False" CssClass="DropDownList">
                                <asp:ListItem></asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="DropDownClientList" AutoPostBack="true" runat="server" DataTextField="clientName"
                                DataValueField="clientid" CssClass="DropDownList">
                            </asp:DropDownList>
                            <asp:DropDownList ID="DropDownList1" AutoPostBack="true" runat="server" OnSelectedIndexChanged="DropDownList_IndexChanged"
                                DataTextField="dateDisplay" DataValueField="date" CssClass="DropDownList">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSourceDateEntered" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                                SelectCommand="SELECT DISTINCT ComponentStatus.dateEntered 
                                                FROM ComponentStatus , Components , Machines 
                                                WHERE ComponentStatus.component_id = Components.component_id 
                                                AND Components.machine_id = Machines.machine_id
                                                AND (Components.machine_id = @id)
                                                Order by ComponentStatus.dateEntered desc">
                                <SelectParameters>
                                    <asp:QueryStringParameter Name="id" QueryStringField="id" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </td>
                        <td class="segmentM">
                            <asp:Button ID="FullReport_Button" runat="server" Text="Get Full Report" OnClick="FullReport_Button_Click"
                                CssClass="buttons" />
                            <asp:Button ID="Data_Sheet_Button" runat="server" Text="Machine Technical Data" CssClass="buttons"
                                OnClick="Data_Sheet_Button_Click" />
                            <asp:Button ID="WorkOrder_Button" runat="server" Text="WorkOrder Management" CssClass="buttons"
                                OnClick="WorkOrder_Button_Click" />
                        </td>
                        <td class="segmentR">
                            <asp:HyperLink ID="photoHyperLink" runat="server" rel="lytebox">click here to enlarge photo</asp:HyperLink>
                        </td>
                    </tr>
                    <tr>
                        <td class="segmentL">
                        </td>
                        <td class="segmentM">
                            <asp:Button ID="CustomReport_Button" runat="server" Text="Customize Report" OnClick="CustomReport_Button_Click"
                                CssClass="buttons" />
                        </td>
                        <td class="segmentR">
                                                    <asp:ImageButton ID="machinePhoto" runat="server" />

                        </td>
                    </tr>
                </table>--%>
                <div class="segmentL">
                    <asp:DropDownList ID="DropDownListDate" runat="server" DataSourceID="SqlDataSourceDateEntered"
                        DataTextField="dateEntered" DataTextFormatString=" {0:d}" DataValueField="dateEntered"
                        Visible="False" CssClass="DropDownList">
                        <asp:ListItem></asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownClientList" AutoPostBack="true" runat="server" DataTextField="clientName"
                        DataValueField="clientid" CssClass="DropDownList" Visible ="false">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList1" AutoPostBack="true" runat="server" OnSelectedIndexChanged="DropDownList_IndexChanged"
                        DataTextField="dateDisplay" DataValueField="date" CssClass="DropDownList">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSourceDateEntered" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                        SelectCommand="SELECT DISTINCT ComponentStatus.dateEntered 
                                                FROM ComponentStatus , Components , Machines 
                                                WHERE ComponentStatus.component_id = Components.component_id 
                                                AND Components.machine_id = Machines.machine_id
                                                AND (Components.machine_id = @id)
                                                Order by ComponentStatus.dateEntered desc">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="id" QueryStringField="id" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </div>
                <div class="segmentM">
                    <asp:Button ID="FullReport_Button" runat="server" Text="Get Full Report" OnClick="FullReport_Button_Click"
                        CssClass="buttons" />
                    <asp:Button ID="CustomReport_Button" runat="server" Text="Customize Report" OnClick="CustomReport_Button_Click"
                        CssClass="buttons" />
                    <asp:Button ID="Data_Sheet_Button" runat="server" Text="Machine Technical Data" CssClass="buttons"
                        OnClick="Data_Sheet_Button_Click" />
                    <asp:Button ID="WorkOrder_Button" runat="server" Text="WorkOrder Management" CssClass="buttons"
                        OnClick="WorkOrder_Button_Click" />
                </div>
            <div class="segmentR">
                    <asp:ImageButton ID="machinePhoto" runat="server" />
                    <br /><asp:HyperLink ID="photoHyperLink" runat="server" rel="lytebox">click here to enlarge photo</asp:HyperLink>
                </div>
            </div>
            <asp:PlaceHolder ID="Component1" runat="server" Visible="True">
                <div class="components">
                    <table>
                        <tr>
                            <td colspan="3">
                                <h4>
                                    <asp:Label ID="ComponentName1" runat="server"></asp:Label>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td class="comps_btns">
                                <asp:HyperLink ID="HyperLink1Oil" Visible="false" runat="server" Text="View Oil Report"
                                    CssClass="link"></asp:HyperLink>
                            </td>
                            <td class="comps_btns">
                            </td>
                            <td class="comps_btns">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:HyperLink ID="CurrentLabel1" runat="server" Text="Current" CssClass="current"></asp:HyperLink>
                                <asp:Label ID="Description1" runat="server" CssClass="description">
                                </asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:HyperLink ID="PreviousLabel1" runat="server" Text="Previous" CssClass="previous"></asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                    <%--
                    <h4>
                        <asp:Label ID="ComponentName1" runat="server"></asp:Label>
                    </h4>
                    <div class="comps_btns">
                        <asp:HyperLink ID="HyperLink1Oil" Visible="true" runat="server" Text="View Oil Report"
                            CssClass="link"></asp:HyperLink>
                    </div>
                    <asp:HyperLink ID="CurrentLabel1" runat="server" Text="Current" CssClass="current"
                        BackColor="#66FF33"></asp:HyperLink>
                    <asp:Label ID="Description1" runat="server" CssClass="description" BackColor="#66FF33">
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
                    </asp:Label>
                    <asp:HyperLink ID="PreviousLabel1" runat="server" Text="Previous" CssClass="previous"></asp:HyperLink>
                --%>
                </div>
            </asp:PlaceHolder>
            <asp:PlaceHolder ID="Component2" runat="server" Visible="False">
                <div class="components">
                    <table>
                        <tr>
                            <td colspan="3">
                                <h4>
                                    <asp:Label ID="ComponentName2" runat="server"></asp:Label>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td class="comps_btns">
                                <asp:HyperLink ID="HyperLink2Oil" Visible="false" runat="server" Text="View Oil Report"
                                    CssClass="link"></asp:HyperLink>
                            </td>
                            <td class="comps_btns">
                            </td>
                            <td class="comps_btns">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:HyperLink ID="CurrentLabel2" runat="server" Text="Current" CssClass="current"></asp:HyperLink>
                                <asp:Label ID="Description2" runat="server" CssClass="description">
                                </asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:HyperLink ID="PreviousLabel2" runat="server" Text="Previous" CssClass="previous"></asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:PlaceHolder>
            <asp:PlaceHolder ID="Component3" runat="server" Visible="False">
                <div class="components">
                    <table>
                        <tr>
                            <td colspan="3">
                                <h4>
                                    <asp:Label ID="ComponentName3" runat="server"></asp:Label>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td class="comps_btns">
                                <asp:HyperLink ID="HyperLink3Oil" Visible="false" runat="server" Text="View Oil Report"
                                    CssClass="link"></asp:HyperLink>
                            </td>
                            <td class="comps_btns1">
                            </td>
                            <td class="comps_btns">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:HyperLink ID="CurrentLabel3" runat="server" Text="Current" CssClass="current"></asp:HyperLink>
                                <asp:Label ID="Description3" runat="server" CssClass="description">
                                </asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:HyperLink ID="PreviousLabel3" runat="server" Text="Previous" CssClass="previous"></asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:PlaceHolder>
            <asp:PlaceHolder ID="Component4" runat="server" Visible="False">
                <div class="components">
                    <table>
                        <tr>
                            <td colspan="3">
                                <h4>
                                    <asp:Label ID="ComponentName4" runat="server"></asp:Label>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td class="comps_btns">
                                <asp:HyperLink ID="HyperLink4Oil" Visible="false" runat="server" Text="View Oil Report"
                                    CssClass="link"></asp:HyperLink>
                            </td>
                            <td class="comps_btns1">
                            </td>
                            <td class="comps_btns">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:HyperLink ID="CurrentLabel4" runat="server" Text="Current" CssClass="current"></asp:HyperLink>
                                <asp:Label ID="Description4" runat="server" CssClass="description"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:HyperLink ID="PreviousLabel4" runat="server" Text="Previous" CssClass="previous"></asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:PlaceHolder>
            <%--    <div class="title">
            FEEDBACK
              
        </div>--%>
            <%--<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>--%>
            <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>
        <asp:PostBackTrigger ControlID="submitButton"  />
                <asp:PostBackTrigger ControlID="UpdateButton" />
        <asp:PostBackTrigger ControlID="EditButton" />
        <asp:PostBackTrigger ControlID="defaultsearch_button" />
        <asp:PostBackTrigger ControlID="prev_wo" />
        <asp:PostBackTrigger ControlID="next_wo" />
        <asp:PostBackTrigger ControlID="createbutton" />
        </Triggers>
        </asp:UpdatePanel>--%>
        </div>
    </div>
    </form>
</body>
</html>